package com.adee.java;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class Test052_int {
    public static void main(String[] args) throws ScriptException {
        System.out.println(3/2*2);
        ScriptEngineManager m = new ScriptEngineManager();
        ScriptEngine e = m.getEngineByName("JavaScript");
        System.out.println(e.eval("3/2*2"));

        System.out.println(Integer.parseInt("01"));
        System.out.println(Integer.parseInt("+1"));

        double d1 = 0.59001;
        double d2 = 0.59001;
        System.out.println(d1 == d2); // true
        System.out.println(d1 == 0.5900100); // true
        // 比较两个浮点数，使用Double.compare方法
        Double.compare(d1, d2);
    }
}
